package com.kuang.system.controller;

import com.kuang.bascic.utils.AjaxResult;
import com.kuang.system.domain.Permission;
import com.kuang.system.mapper.PermissionMapper;
import com.kuang.system.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Autowired
    private PermissionService permissionService;
    @GetMapping
    public AjaxResult selectallPermission(){
        List<Permission> permissions = permissionService.selectAllDepartment();
        return AjaxResult.me().setResultObj(permissions);
    }
}
